package com._520it.crm.service;

import com._520it.crm.domain.Client;
import com._520it.crm.page.PageResult;
import com._520it.crm.query.QueryObject;

import java.util.List;

/**
 * Created by Administrator on 2017/10/9.
 */
public interface IClientService {
    int deleteByPrimaryKey(Long id);

    int insert(Client record);

    Client selectByPrimaryKey(Long id);

    List<Client> selectAll();

    int updateByPrimaryKey(Client record);

    PageResult queryPage(QueryObject qo);

    /**
     * 无效客户操作
     * @param clientId
     */
    void invalidByPrimaryKey(Long clientId);

    /**
     * 客户转正操作
     * @param clientId
     */
    void formalByPrimaryKey(Long clientId);

    /**
     * 将客户放入资源池
     * @param clientId
     */
    void putPoolByPrimaryKey(Long clientId);

    /**
     * 获取客户
     * @param clientId
     */
    void acquire(Long clientId);

    /**
     * 移交客户
     * @param clientId
     * @param managerId
     */
    void updateManager(Long clientId, Long managerId);

    /**
     * 查询所有潜在客户
     * @return
     */
    List<Client> selectPotentialClient();

    Client selectByOrderBillId(Long orderBillId);

    void updateFromRivise(Client client);

    /**
     * 根据身份证号码查询客户
     * @param idcardnumber
     * @return
     */
    Client queryByidcardnumber(String idcardnumber);

    /**
     * 根据excel表格内容向数据库插入数据
     * @param client
     * @return
     */
    int insertByExcelUpload(Client client);

    void updateClient(Client client);
}
